﻿using System;
using System.Collections.Generic;
using NUnit.Framework;
using System.Collections;
using System.Diagnostics;

namespace NHibernate.Test.Playground
{
    [TestFixture]
    public class SimpleDynamicProperties : TestCase
    {
        protected override System.Collections.IList Mappings
        {
            get { return new[] { "Playground.Customer.hbm.xml", "Playground.Order.hbm.xml" }; }
        }
        protected override string MappingsAssembly
        {
            get { return "NHibernate.Test"; }
        }
        

        protected static void Output(object obj)
        {
            Debug.WriteLine(obj);
        }
    }   
    public class Customer {
    	public virtual Guid Id {get; protected set;}
    	public virtual string FirstName {get; set; }
    	public virtual IDictionary DynamicProperties { get; protected set; }
        public Customer()
        {
            DynamicProperties = new Dictionary<string, object>();
        }
    }
    public class Order
    {
        public virtual Guid Id { get; protected set; }
        public virtual IDictionary DynamicProperties1 { get; protected set; }
        public virtual IDictionary DynamicProperties2 { get; protected set; }
        public virtual Customer Customer { get; protected set; }
        protected Order()
        {
            DynamicProperties1 = new Dictionary<string, object>();
            DynamicProperties2 = new Dictionary<string, object>();
        }
        public Order(Customer customer)
            : this()
        {
            Customer = customer;
        }
    }

}
